<!-- 选择型号 -->
<template>
	<view style="height: 100vh;text-align: center;" class="flex_column">
		 <page-head></page-head>
		 <view class="rem06" style="padding-top: 1rem;">请选择要匹配的机器型号</view>
		 <view style="flex: 1;justify-content: center;align-items: center;" class="flex_row">
			 <view v-for="(item,i) in btnArr" class="item-con" @click="item_click(i)">
			 <text :style="i==index?'color: #36BB6B;':''">{{item}}</text>
			 </view>
		 </view>
         <view class="allCenter" style="margin-bottom: 5vh;width: 100%;">
             <view style="width: 28vh;height: 10vh;" >
             			 <button  @click="navigateTo('/pages/home/home')" style="background: #44CE7B;">
             			 	<view style="padding: 1vh 2vh;">确定</view>
             			 </button>
             </view>
         </view>
		 <!-- 选择型号 -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index:0,
				// btnArr:["YL-8系","YL-6系","YL-4系"],
				btnArr:["YL-8系","YL-6系","YL-4系"],
				
			}
		},
		onShow: function() {
			this.index = getApp().globalData.type;
			// console.log(getApp().globalData.type)
		},
		methods: {
			item_click(i){
				getApp().globalData.type=this.index=i;
			},
			navigateTo(url){
			    uni.navigateTo({
			    	url: url
			    })
			},
		}
	}
</script>

<style>
page {
		background: #3E4469;
	}
	.item-con{
		border: 1px solid #fff;
		border-radius: 2vh;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 5.5vh;
		width: 26vh;
		height: 26vh;
		margin: 4vh;
	}
</style>
